<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html">
		<title>Justone酒店入住实名采集系统</title>
		<%@ include file="/cms/common/common_ref.jsp" %>
		
	<script type="text/javascript" src="<%=request.getContextPath()%>/cms/js/jquery-1.3.2.min.js"></script>
		<style type="text/css">
		body {
			margin-left: 0px;
			margin-top: 0px;
			margin-right: 0px;
			margin-bottom: 0px;
			background-color: #016aa9;
			overflow:hidden;
		}
		.STYLE1 {
			color: #000000;
			font-size: 12px;
		}
		</style>
		
		<script type="text/javascript">
			function sub() {
			       $.ajax({
			           // 后台处理程序
			           url : "action3/collectionquery/main!login.do",
			           // 数据发送方式
			           type : "post",
			           // 接收数据格式
			           dataType : "text",
			           // 要传递的数据
			           data : "admin.userId="+$("#username").val()+"&admin.userPwd="+$("#password").val(),
			           // 回传函数
			            timeout:20000,// 设置请求超时时间（毫秒）。  
			            error: function () {//请求失败时调用函数。
			            	$('#floatMsg')[0].style.display="";
			                 $('#floatMsg').fadeOut().fadeIn().fadeOut().fadeIn();
			                 
			            },  
			            success:function(data){ //请求成功后回调函数。
			            	// var dataObj=eval("("+data+")");
			            	 if (data=='success'){
			            	 	top.location.href="action3/collectionquery/main!cq.do"
			            	 }else{
			            	 	$('#floatMsg')[0].style.display="";
			                 	$('#floatMsg').fadeOut(function() { 
									if ($.browser.msie) { 
									    this.style.removeAttribute('filter'); 
									} 
									}).fadeIn().fadeOut(function() { 
									if ($.browser.msie) { 
									    this.style.removeAttribute('filter'); 
									} 
									}).fadeIn();
			            	 }
			           }
			       });
			    }
			    //Firefox add event
				if(document.addEventListener)
				{	
					document.addEventListener("keypress",fireFoxHandler, true);
				}
				
				function fireFoxHandler(evt)
				{
					if(evt.keyCode==13)
					{
						sub()
					}
				}
		
		</script>
	</head>
	<body onload="javascript:document.getElementById('username').focus();">
	<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
	  <tr>
	    <td><table width="962" border="0" align="center" cellpadding="0" cellspacing="0">
	      <tr>
	        <td height="235" background="<%=path%>/cms/images/login/login_03_1.gif">&nbsp;</td>
	      </tr>
	      <tr>
	        <td height="53"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	          <tr>
	            <td width="394" height="53" background="<%=path%>/cms/images/login/login_05.gif">&nbsp;</td>
	            <td width="206" background="<%=path%>/cms/images/login/login_06.gif">
	            
	            <table width="100%" border="0" cellspacing="0" cellpadding="0">
	              <tr>
	                <td width="18%" height="25"><div align="right"><span class="STYLE1"><s:text name="login.username"/></span></div></td>
	                <td width="55%" height="25"><div align="center">
	                  <input type="text"  id="username" name="username" size="32" tabindex="1" accesskey="1" style="width:105px; height:17px; background-color:#292929; border:solid 1px #7dbad7; font-size:12px; color:#6cd0ff">
	                </div></td>
	                <td width="27%" height="25">&nbsp;</td>
	              </tr>
	              <tr>
	                <td height="25"><div align="right"><span class="STYLE1"><s:text name="login.password"/></span></div></td>
	                <td height="25"><div align="center">
	                  <input type="password" id="password" name="password" size="32" tabindex="2" accesskey="2" style="width:105px; height:17px; background-color:#292929; border:solid 1px #7dbad7; font-size:12px; color:#6cd0ff">
	                </div></td>
	                <td height="25"><div align="left"><input type="submit"" onclick="sub()" id="submit" accesskey="3" value="" style="background-image:url('<%=path%>/cms/images/login/<s:text name="login.dl.gif"/>'); width:49px; height:18px; border:0"/></div></td>
	              </tr>
	            </table>
	            
	            </td>
	            <div style="display:none; position:absolute; top:10px; right:10px; width:400px; background-color:#FFFFCC; border:1px solid #ccc; padding:5px; font-weight:bold" id="floatMsg">
 					<a href="###" onclick="$('#floatMsg').fadeOut()">
 					<img src="<%=path%>/cms/images/close_box.gif" border="0" style="float:right" /> </a>
 						<s:text name="login.failed"/></div>
					
	            <td width="362" background="<%=path%>/cms/images/login/login_07.gif">&nbsp;</td>
	          </tr>
	        </table></td>
	      </tr>
	      <tr>
	        <td height="213" background="<%=path%>/cms/images/login/<s:text name='login.login_08.gif'/>">&nbsp;</td>
	      </tr>
	    </table></td>
	  </tr>
	</table>
	</body>
</html>